package com.meituan.sdk.model.ddzh.common.grayConfigRollbackBySession;

import com.meituan.sdk.annotations.ApiMeta;
import com.google.gson.reflect.TypeToken;
import javax.validation.constraints.NotBlank;
import java.lang.reflect.Type;
import com.meituan.sdk.internal.utils.JsonUtil;
import com.google.gson.annotations.SerializedName;
import com.meituan.sdk.MeituanResponse;
import com.meituan.sdk.MeituanRequest;

/**
* 回滚灰度配置（指定开发者和session）
* This file was automatically generated.
*/
@ApiMeta(
    path = "/ddzh/common/gray/rollbackBySession",
    businessId = 58,
    apiVersion = "10000",
    apiName = "gray_config_rollback_by_session",
    needAuth = false
)
public class GrayConfigRollbackBySessionRequest implements MeituanRequest<String> {
    /**
    * <p data-diff-id="ct-diff-id-5dc202c6-761c-454b-9b79-b0f8fa0f607d">原北极星的应用AppKey。此值需与developerId存在关联关系</p>
    */
    @NotBlank(message = "appKey不能为空")
    @SerializedName("appKey")
    private String appKey;
    /**
    * <p data-diff-id="ct-diff-id-d9c6bf81-6c15-4498-9363-d82baefe70a8">已完成迁移的session</p>
    */
    @NotBlank(message = "session不能为空")
    @SerializedName("session")
    private String session;

    public String getAppKey() {
        return appKey;
    }
    public void setAppKey(String appKey) {
        this.appKey = appKey;
    }
    public String getSession() {
        return session;
    }
    public void setSession(String session) {
        this.session = session;
    }


    @Override
    public MeituanResponse<String> deserializeResponse(String response) {
        Type type = new TypeToken<MeituanResponse<String>>(){}.getType();
        return JsonUtil.fromJson(response, type);
    }
    @Override
    public String serializeToJson() {
        return JsonUtil.toJson(this);
    }


    @Override
    public String toString() {
        return "GrayConfigRollbackBySessionRequest{" + "appKey=" + appKey + "," + "session=" + session + "}";
    }
}
